module BCDto7(in4,out7);
input[4:0] in4;
output reg[6:0] out7;
always@(in4)
begin case(in4)
5'H0:out7=7'b1000000;
5'H1:out7=7'b1111001;
5'H2:out7=7'b0100100;
5'H3:out7=7'b0110000;
5'H4:out7=7'b0011001;
5'H5:out7=7'b0010010;
5'H6:out7=7'b0000010;
5'H7:out7=7'b1111000;
5'H8:out7=7'b0000000;
5'H9:out7=7'b0011000;
5'HA:out7=7'b0001000;
5'Hb:out7=7'b0000011;
5'Hc:out7=7'b1000110;
5'Hd:out7=7'b0100001;
5'He:out7=7'b0000110;
5'Hf:out7=7'b0001110;
default:out7=7'b1111111;
endcase
end
endmodule